home *** CD-ROM | disk | FTP | other *** search
AMOS Source Code | 1992-02-26 | 3.4 KB | 166 lines |
- ' M.A.Z.E. v1.0�
- '
- ' �1995 Mike Richmond
- '
- ' The full version (which will NEVER be released :-) features IFF piccies,
- ' a Rave-ey title tune and in-game music that changes speed as you get
- ' further up the screen. Can you find the cheat mode?
- '
- ' Right button drops a bomb, mouse moves player. The idea is to get to the
- ' top of the screen as fast as possible. It is VERY easy to do it in 0
- ' seconds but I won#t tell you how...
- '
- ' Note : This code is badly structured and sparsely commented.
- '
- ' But I don't care...
- '
- _START:
- '
- Screen Open 0,320,200,16,Lowres
- '
- Led Off : Hide On : Curs Off : Flash Off
- ' Standard stuff
- '
- Centre "M.A.Z.E. by Mike Richmond"
- Print : Print : Print
- Centre "Press left mouse to play..."
- Print : Print : Print
- Centre "If you dare!"
- '
- ' The Title Screen
- Repeat
- X$=Inkey$
- If X$="c"
- CHEAT=1
- End If
- If X$="d"
- CHEAT=0
- End If
- Until Mouse Key=1
- '
- '
- Screen Open 0,320,200,4,Lowres
- Palette $0,$0,$0,$0
- Flash Off : Curs Off
- BOMBS=9
- '
- '
- '
- Cls 0
- '
- Pen 1 : Paper 0
- '
- ' This routine generates a random maze from the / and \ characters. Coders
- ' who used to have a C64 may remember this routine from the C64 manual!
- For X=0 To 39
- For Y=1 To 23
- M=Rnd(1)
- If M=0 Then A$="/"
- If M=1 Then A$="\"
- Locate X,Y
- Print A$;
- Next
- Next
- '
- Fade 4,$0,$FFF,$F00,$FF0
- Ink 0 : Bar 0,0 To 319,7 : Home : Centre "Move Mouse to Bottom of Screen and Click"
- '
- Show On
- '
- Repeat
- Until Y Mouse>198 and Mouse Key<>0
- '
- '
- Ink 0 : Bar 0,0 To 319,7
- A$="BOMBS -"+Str$(BOMBS)
- Ink 2,0 : Text 0,8,A$
- Hide On
- Flash 1,"(777,3)(888,3)(999,3)(aaa,3)(bbb,3)(ccc,3)(ddd,3)(eee,3)(fff,3)(eee,3)(ddd,3)(ccc,3)(bbb,3)(aaa,3)(999,3)(888,3)"
- '
- X=X Screen(X Mouse) : Y=Y Screen(Y Mouse)
- OX=X : OY=Y
- Plot X,Y,2
- TIME=0
- '
- ' Resets everything
- '
- Do
- X=X Screen(X Mouse)
- Y=Y Screen(Y Mouse)
- Sprite 0,X Hard(X),Y Hard(Y),1
- '
- T=(200-Y)/4
- If T<10 Then T=10
- Tempo T
- '
- If Y=0 Then Goto _WIN
- '
- If Point(X,Y)=1
- Goto _LOSE
- End If
- '
- Draw OX,OY To X,Y
- OX=X : OY=Y
- '
- ' Your droid leaves a trail so you can chart your progress through the
- ' maze.
- '
- If Mouse Click=2 and BOMBS>0
- Ink 3
- For C=1 To 7
- Circle X,Y,C
- Next
- '
- ' Bomb routine actually leaves rubble! First, it draws 7 circles
- ' with increasing radii (in yellow)
- '
- Ink 0
- For C=1 To 7
- Circle X,Y,C
- Next
- '
- ' Then in black to delete them!
- '
- Ink 2,0
- If CHEAT=0
- Dec BOMBS
- End If
- A$="BOMBS -"+Str$(BOMBS)
- Text 0,8,A$
- End If
- '
- ' Prints the number of bombs on the screen
- '
- Inc TIME
- ' Increases the TIME variable, held in Vbls for conversion later
- Wait Vbl
- Loop
- '
- _WIN:
- Sprite Off : Flash Off : Pen 2 : Paper 0
- '
- Fade 4,$0,$0,$0,$0 : Wait 100 : Cls
- Screen Open 0,320,200,16,Lowres
- Flash Off : Curs Off
- Home : Print : Print : Print : Centre "You win!"
- A$="You took -"+Str$(Int(TIME/50))+" Seconds"
- Print : Print : Print : Pen 2 : Paper 0 : Centre A$
- Goto _END
- '
- _LOSE:
- Sprite Off : Flash Off : Pen 2 : Paper 0
- Boom
- '
- Fade 4,$0,$0,$0,$0 : Wait 100 : Cls
- Screen Open 0,320,200,16,Lowres
- Flash Off : Curs Off
- Home : Print : Print : Print : Centre "You lose!"
- A$="You lasted -"+Str$(Int(TIME/50))+" Seconds"
- Home : Print : Print : Print : Pen 2 : Paper 0 : Centre A$
- '
- _END:
- Repeat
- Until Mouse Key<>0
- Fade 4
- Wait 100 : Cls : Home
- Goto _START